Skip to content

[FEM.Elastic] Introduce generic element-agnostic elastic FEM force field#5882

Open
alxbilger wants to merge 6 commits intosofa-framework:masterfrom
alxbilger:elasticity
Open

[FEM.Elastic] Introduce generic element-agnostic elastic FEM force field#5882
alxbilger wants to merge 6 commits intosofa-framework:masterfrom
alxbilger:elasticity

Conversation

@alxbilger
Copy link
Contributor

@alxbilger alxbilger commented Jan 22, 2026

Coming from https://github.com/alxbilger/Elasticity

TODO:

  • add tests
  • add scenes

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature pr: highlighted in next release Highlight this contribution in the notes of the upcoming release labels Jan 22, 2026
@hugtalbot hugtalbot added the topic for next dev-meeting PR to be discussed in sofa-dev meeting label Jan 23, 2026
@fredroy
Copy link
Contributor

fredroy commented Jan 28, 2026

[ci-build][with-all-tests]

Copy link
Contributor

@th-skam th-skam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only touched some easy to read files. Will try to take a better look in the next days.
But I really like the overall work.

template<sofa::Size L, sofa::Size C, typename ValueType>
sofa::type::Vec<L, ValueType> operator*(const sofa::type::Mat<L, C, ValueType>& mat, const VecView<C, ValueType>& vec)
{
sofa::type::Vec<L, ValueType> res(sofa::type::NOINIT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sofa::type::Vec<L, ValueType> res(sofa::type::NOINIT);
sofa::type::Vec<L, ValueType> res;

There's a res+= a few lines later and should be initialized.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This has to be changed in the other operator too

@alxbilger alxbilger removed the topic for next dev-meeting PR to be discussed in sofa-dev meeting label Feb 5, 2026
@hugtalbot
Copy link
Contributor

This PR deserves the attention of all @sofa-framework/reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants